home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / UTILFILE / UNPROPTC.LZH / COMMOD.TXT < prev    next >
Text File  |  1984-11-09  |  7KB  |  325 lines

  1. a 1ed
  2. ;this file contains the code to modify command.com in several ways
  3. ; 1) increases command.com's size by 1k and intercepts the command processor
  4. ;               (see PC August 7,1984 "Get SET for Speed")
  5. ;
  6. ; 2) adds 4 Resident commands to command.com
  7. ;       these commands are:
  8. ;               i) a utility to switch from 80col. mono to 40
  9. ;                  col. color.  This command is invoked by
  10. ;                  type s <space> <return> at the Dos prompt.
  11. ;                  Note that there must be a space following
  12. ;                  the letter s.  After this command is entered
  13. ;                  the active screen will change over to the unactive
  14. ;                  one.
  15. ;
  16. ;              ii) a modified file deletion routine similar to
  17. ;                  VDEL.COM.  The command is invoked by typing
  18. ;                  d <space> drive id. (not neccessary) file
  19. ;                  deliminators <return> at the Dos prompt.
  20. ;                  For example d b:*.bas  Files which have the
  21. ;                  attribute Read Only will generate the error
  22. ;                  message 'Access Denied' and will not be deleted.
  23. ;
  24. ;             iii) a utility to change the attribute of files
  25. ;                  between Read/Write and Read Only, or Hidden
  26. ;                  and Unhidden, or System and Non-System.  The
  27. ;                  command is invoked by typing a <space> 'x' filespec
  28. ;                  at the Dos prompt.  The 'x' must be replaced by
  29. ;                  one of the following valid commands.
  30. ;                       c - current attributes of file
  31. ;                       r - toggle Read/Write / Read Only
  32. ;                       h - toggle Hidden/Unhidden
  33. ;                       s - toggle System/Non-System
  34. ;
  35. ;                  For example.  a c command.com
  36. ;                    will display the current attributes of command.com
  37. ;
  38. ;              iv) a utility to beep the speaker.  Invoked by typing
  39. ;                  b <space> <return>.  For use in batch files
  40. ;                  the b <space> must be followed by any character.
  41. ;                  This is to keep the <space> after the b from
  42. ;                  being truncated.
  43. ;
  44. ; ****  To add these commands to command.com type the following at the
  45. ;       Dos prompt
  46. ;                       DEBUG COMMAND.COM < COMMOD.TXT <return>
  47. ;
  48. ; At the current time I have not documented this modification.  If anyone
  49. ;has any questions drop me a message.  If anyone has any specs. on making
  50. ;this modification DOS 2.1 compatible please let me know!  This shouldn't
  51. ;be too hard - all that is required is the addresses for making command.com
  52. ;larger.
  53. ;
  54. ;NOTE: For anyone examining the code they will note that all references to
  55. ;data areas are smaller by hex 10C0.  This is not a bug - it is like this due
  56. ;the way command.com loads.
  57. ;
  58. ; Mike Cumming
  59. ; 94 Aldershot Blvd
  60. ; Wpg, Man.
  61. ; Compuserve 70376,466
  62. ;
  63. add dx,3270  ; this set of code increases command.com's size
  64.  
  65. a 3ad
  66. cmp bx,3b0
  67.  
  68. a 3cd
  69. sub bx,390
  70.  
  71. a 691
  72. mov cx,37be
  73.  
  74. a 6a9
  75. cmp cx,37be
  76.  
  77. a c9d
  78. sub ax,390
  79.  
  80. a 140b
  81. call 4030
  82.  
  83. m 4030 4580 4430
  84. f 4030 442f 0
  85. r cx
  86. 4900
  87. a 4030
  88. MOV     SI,2B8B         ; This section of code intercepts the command
  89. CLD                     ; processor and decides whether any action
  90. LODSB                   ; should be taken
  91. PUSH    AX
  92. LODSB
  93. CMP     AL,20
  94. POP     AX
  95. JNZ     405F
  96. AND     AL,DF
  97. CMP     AL,53
  98. JZ      4077
  99. CMP     AL,44
  100. JZ      40A3
  101. CMP     AL,41
  102. JZ      4066
  103. CMP     AL,42
  104. JZ      4070
  105. CMP     AL,FF
  106. JZ      406D
  107. CMP     AL,FF
  108. JZ      4072
  109. JMP     405E
  110. MOV     DI,2B8B
  111. MOV     AX,0D0D
  112. STOSW
  113. PUSH    CS
  114. POP     ES
  115. MOV     CX,0886
  116. JMP     CX
  117. JMP     4160
  118. NOP
  119. NOP
  120. NOP
  121. NOP
  122. NOP
  123. NOP
  124. NOP
  125. JMP     425E
  126. NOP
  127. NOP
  128. NOP
  129. NOP
  130.  
  131. a 4077
  132. PUSH    DS              ; this section of code switches screens
  133. MOV     AX,0040
  134. MOV     DS,AX
  135. MOV     AL,[0010]
  136. PUSH    AX
  137. AND     AL,30
  138. CMP     AL,30
  139. POP     AX
  140. JZ      4094
  141. OR      AL,30
  142. MOV     [0010],AL
  143. MOV     AX,0007
  144. INT     10
  145. JMP     40A0
  146. AND     AL,CF
  147. OR      AL,20
  148. MOV     [0010],AL
  149. MOV     AX,0001
  150. INT     10
  151. POP     DS
  152. JMP     4058
  153.  
  154. a 40a3
  155. MOV     DX,2C4F         ; this is the random delete code
  156. MOV     AH,1A
  157. INT     21
  158. MOV     SI,2B8D
  159. LODSB
  160. CMP     AL,0D
  161. JNZ     40AD
  162. MOV     DI,SI
  163. SUB     DI,01
  164. MOV     AL,00
  165. STOSB
  166. MOV     DX,2B8D
  167. MOV     AH,4E
  168. INT     21
  169. JB      40F1
  170. MOV     DX,305B
  171. MOV     AH,09
  172. INT     21
  173. MOV     SI,2C6D
  174. LODSB
  175. CMP     AL,00
  176. JZ      40DA
  177. MOV     DL,AL
  178. MOV     AH,02
  179. INT     21
  180. JMP     40CD
  181. MOV     DX,3066
  182. MOV     AH,09
  183. INT     21
  184. MOV     AH,01
  185. INT     21
  186. AND     AL,DF
  187. CMP     AL,59
  188. JZ      40FB
  189. MOV     AH,4F
  190. INT     21
  191. JMP     40C1
  192. MOV     DX,3070
  193. MOV     AH,09
  194. INT     21
  195. JMP     4058
  196. MOV     SI,2C6D
  197. MOV     DI,2B8F
  198. LODSB
  199. STOSB
  200. CMP     AL,00
  201. JNZ     4101
  202. JMP     424E
  203. MOV     AH,41
  204. INT     21
  205. JB      4112
  206. JMP     40EB
  207. MOV     AH,09
  208. MOV     DX,308E
  209. INT     21
  210. JMP     40EB
  211.  
  212. a 4160
  213. MOV     SI,2B8F         ; this code alters attribute bytes of files
  214. LODSB
  215. CMP     AL,0D
  216. JNZ     4163
  217. MOV     AL,00
  218. MOV     [SI-01],AL
  219. MOV     DX,2B8F
  220. MOV     AH,43
  221. INT     21
  222. JB      41DE
  223. MOV     AL,[2B8D]
  224. AND     AL,DF
  225. CMP     AL,43
  226. JZ      419D
  227. CMP     AL,52
  228. JNZ     4187
  229. XOR     CX,0001
  230. CMP     AL,53
  231. JNZ     418F
  232. XOR     CX,0004
  233. CMP     AL,48
  234. JNZ     4197
  235. XOR     CX,0002
  236. MOV     AL,01
  237. MOV     AH,43
  238. INT     21
  239. MOV     AH,09
  240. MOV     BX,CX
  241. AND     BX,00FE
  242. CMP     BX,CX
  243. JZ      41AE
  244. MOV     DX,313E
  245. JMP     41B1
  246. MOV     DX,314B
  247. INT     21
  248. MOV     BX,CX
  249. AND     BX,00FD
  250. CMP     BX,CX
  251. JZ      41C2
  252. MOV     DX,315A
  253. JMP     41C5
  254. MOV     DX,3165
  255. INT     21
  256. MOV     BX,CX
  257. AND     BX,00FB
  258. CMP     BX,CX
  259. JZ      41D6
  260. MOV     DX,3172
  261. JMP     41D9
  262. MOV     DX,317E
  263. INT     21
  264. JMP     4058
  265. MOV     DX,3128
  266. MOV     AH,09
  267. INT     21
  268. JMP     4058
  269.  
  270. a 424e
  271. MOV     DX,2B8D         ; these few lines are to fix a small bug that
  272. MOV     AL,[2B8E]       ; was in the random delete.  It was placed here
  273. CMP     AL,3A           ; because of the difficulty of moving all the
  274. JZ      425B            ; code that was above it
  275. MOV     DX,2B8F
  276. JMP     410A
  277.  
  278. a 425e
  279. MOV     BX,05DC         ; this code beeps the speaker
  280. IN      AL,61
  281. PUSH    AX
  282. AND     AL,FC
  283. OUT     61,AL
  284. MOV     CX,0032
  285. LOOP    426B
  286. OR      AL,02
  287. OUT     61,AL
  288. MOV     CX,0032
  289. LOOP    4274
  290. DEC     BX
  291. JNZ     4264
  292. POP     AX
  293. OUT     61,AL
  294. JMP     4058
  295.  
  296. ;the following data is for error messages etc.
  297.  
  298. e 411B
  299. 0D 0A 0A 44 65
  300. e 4120
  301. 6C 65 74 65 20 24 20 28 79 2F 6E 29 20 3F 20 24
  302. e 4130
  303. 0D 0A 0A 4E 6F 20 6D 6F 72 65 20 6D 61 74 63 68
  304. e 4140
  305. 69 6E 67 20 66 69 6C 65 73 2E 0D 0A 0A 24 20 20
  306. e 4150
  307. 07 41 63 63 65 73 73 20 44 65 6E 69 65 64 2E 24
  308. e 41E8
  309. 0A 0A 0D 46 69 6C 65 20
  310. e 41F0
  311. 6E 6F 74 20 66 6F 75 6E 64 0D 0A 0A 24 0D 0A 52
  312. e 4200
  313. 65 61 64 20 4F 6E 6C 79 20 20 24 0D 0A 52 65 61
  314. e 4210
  315. 64 2F 57 72 69 74 65 20 20 24 0D 0A 48 69 64 64
  316. e 4220
  317. 65 6E 20 20 24 0D 0A 55 6E 48 69 64 64 65 6E 20
  318. e 4230
  319. 20 24 0D 0A 53 79 73 74 65 6D 0D 0A 0A 24 0D 0A
  320. e 4240
  321. 4E 6F 6E 2D 53 79 73 74 65 6D 0D 0A 0A 24
  322.  
  323. w
  324. q
  325.